<!-- Table (TABLE) -->
 <div >
      <h3 class="tit"><?php if (isset($start_date)) echo $start_date." To ".$end_date;?> Scheduling Information</h3>
      <table>
        <tr>
          <th style="width:200px;">Date</th>
          <th style="width:200px;">Leader</th>
          <th style="width:200px;">Staff</th>
          <?php 
				$tmpCI = &get_instance();
				if($tmpCI->session->userdata("usertype")== 4){
			?>
          <th style="width:80px;">Edit</th>
          <?php }?>
        </tr>
<?php 
		$i = 0;
		if (isset($list))
		{
        foreach ($list as $row)
		{
			?>
		 <tr <?php if ($i%2 == 1)echo 'class="bg"';?>>
			<td>
			<?php 
			echo $row["date"];
			?>
			</td>
			<td>
			<?php 
			echo $row["leadname"];
			?>
			</td>
			<td>
			<a href="/index.php/user/detail/<?php echo $row["staffid"];?>">
			<?php 
			echo $row["staffname"];
			?></a>
			</td>
			<?php 
				$tmpCI = &get_instance();
				if($tmpCI->session->userdata("usertype")== 4){
			?>
			
			<td>
			<?php 
			echo '<a href="'.base_url("index.php/scheduling/edit/".$row["sid"]).'">Edit</a>';
			?>
			</td>
			<?php 
				}
			
			?>
			</tr>
			
<?php 
	$i++;
		}
	}
?>



      </table>
      
 </div>